🎖️GitЯра🎖️
Commit eb7bfce4d47b758e411db81b3effdc7f608bd37f
Parents : 03009c4
Author : James Rich <2199651+jamesarich@users.noreply.github.com>
Signature : Signature validation error
Date : 2026-06-28T09:17:53-05:00
Committer : GitHub <noreply@github.com>
Date : 2026-06-28T14:17:53Z
chore: migrate kotlinx-collections-immutable to participial method names (#5991)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Changes
4 files changed, 11 insertions(+), 11 deletions(-)
Diff
diff --git a/core/data/src/commonMain/kotlin/org/meshtastic/core/data/manager/NodeManagerImpl.kt b/core/data/src/commonMain/kotlin/org/meshtastic/core/data/manager/NodeManagerImpl.kt
index f5111bdb2e..0b24b30042 100644
--- a/core/data/src/commonMain/kotlin/org/meshtastic/core/data/manager/NodeManagerImpl.kt
+++ b/core/data/src/commonMain/kotlin/org/meshtastic/core/data/manager/NodeManagerImpl.kt
@@ -71,19 +71,19 @@ class NodeManagerImpl(
var nextById = byId
// If the user.id changed (e.g. firmware reassigned the hex id) drop the stale id entry.
if (previous != null && previous.user.id.isNotEmpty() && previous.user.id != node.user.id) {
- nextById = nextById.remove(previous.user.id)
+ nextById = nextById.removing(previous.user.id)
}
if (node.user.id.isNotEmpty()) {
- nextById = nextById.put(node.user.id, node)
+ nextById = nextById.putting(node.user.id, node)
}
- return NodeIndex(byNum = byNum.put(num, node), byId = nextById)
+ return NodeIndex(byNum = byNum.putting(num, node), byId = nextById)
}
fun remove(num: Int): NodeIndex {
val previous = byNum[num] ?: return this
return NodeIndex(
- byNum = byNum.remove(num),
- byId = if (previous.user.id.isNotEmpty()) byId.remove(previous.user.id) else byId,
+ byNum = byNum.removing(num),
+ byId = if (previous.user.id.isNotEmpty()) byId.removing(previous.user.id) else byId,
)
}
@@ -92,8 +92,8 @@ class NodeManagerImpl(
var byNum = persistentMapOf<Int, Node>()
var byId = persistentMapOf<String, Node>()
for ((num, node) in nodes) {
- byNum = byNum.put(num, node)
- if (node.user.id.isNotEmpty()) byId = byId.put(node.user.id, node)
+ byNum = byNum.putting(num, node)
+ if (node.user.id.isNotEmpty()) byId = byId.putting(node.user.id, node)
}
return NodeIndex(byNum, byId)
}
diff --git a/core/data/src/commonMain/kotlin/org/meshtastic/core/data/manager/RequestTimer.kt b/core/data/src/commonMain/kotlin/org/meshtastic/core/data/manager/RequestTimer.kt
index 1dde1d6a8a..42a2c3414d 100644
--- a/core/data/src/commonMain/kotlin/org/meshtastic/core/data/manager/RequestTimer.kt
+++ b/core/data/src/commonMain/kotlin/org/meshtastic/core/data/manager/RequestTimer.kt
@@ -37,7 +37,7 @@ internal class RequestTimer {
/** Records the start time for [requestId]. */
fun start(requestId: Int) {
- startTimes.update { it.put(requestId, nowMillis) }
+ startTimes.update { it.putting(requestId, nowMillis) }
}
/**
@@ -46,7 +46,7 @@ internal class RequestTimer {
*/
fun appendDuration(requestId: Int, text: String, logLabel: String): String {
val start = startTimes.value[requestId]
- startTimes.update { it.remove(requestId) }
+ startTimes.update { it.removing(requestId) }
if (start == null) return text
val seconds = (nowMillis - start) / MILLIS_PER_SECOND
Logger.i { "$logLabel $requestId complete in $seconds s" }
diff --git a/core/data/src/commonMain/kotlin/org/meshtastic/core/data/manager/SessionManagerImpl.kt b/core/data/src/commonMain/kotlin/org/meshtastic/core/data/manager/SessionManagerImpl.kt
index 9a9c290f54..54ee691208 100644
--- a/core/data/src/commonMain/kotlin/org/meshtastic/core/data/manager/SessionManagerImpl.kt
+++ b/core/data/src/commonMain/kotlin/org/meshtastic/core/data/manager/SessionManagerImpl.kt
@@ -63,7 +63,7 @@ class SessionManagerImpl(private val clock: Clock) : SessionManager {
override fun recordSession(srcNodeNum: Int, passkey: ByteString) {
if (passkey.size == 0) return
val now = clock.now()
- entries.update { it.put(srcNodeNum, SessionEntry(passkey, now)) }
+ entries.update { it.putting(srcNodeNum, SessionEntry(passkey, now)) }
Logger.d { "Recorded session refresh from $srcNodeNum (${passkey.size} bytes)" }
refreshFlow.tryEmit(srcNodeNum)
}
diff --git a/core/prefs/src/commonMain/kotlin/org/meshtastic/core/prefs/FlowCache.kt b/core/prefs/src/commonMain/kotlin/org/meshtastic/core/prefs/FlowCache.kt
index 2d8602c8b2..ae9e18fddc 100644
--- a/core/prefs/src/commonMain/kotlin/org/meshtastic/core/prefs/FlowCache.kt
+++ b/core/prefs/src/commonMain/kotlin/org/meshtastic/core/prefs/FlowCache.kt
@@ -42,7 +42,7 @@ internal inline fun <K, V> cachedFlow(
current[key]?.let {
return it.value
}
- if (cache.compareAndSet(current, current.put(key, newLazy))) {
+ if (cache.compareAndSet(current, current.putting(key, newLazy))) {
return newLazy.value
}
}
Served by rngit 1.5.2 - Generated in 0.09s